﻿@using Samples.Explorer.Controllers.Explorer
@model DirectoryView
@{
  ViewBag.Title = "Explorer - " + Model.VirtualPath;
}
@section navigation {
<ul class="nav">
  <li@(Model.Filter == EntrySource.Merged ? Html.Raw(" class=\"active\"") : null)><a href="@Url.Action("index", "explorer", new { filter = EntrySource.Merged })">All</a></li>
  <li@(Model.Filter == EntrySource.Application ? Html.Raw(" class=\"active\"") : null)><a href="@Url.Action("index", "explorer", new { filter = EntrySource.Application })">Application</a></li>
  <li@(Model.Filter == EntrySource.Template ? Html.Raw(" class=\"active\"") : null)><a href="@Url.Action("index", "explorer", new { filter = EntrySource.Template })">Template</a></li>
</ul>
}
<ul class="breadcrumb">
@foreach (var breadcrumb in Model.Breadcrumbs)
{
  if (breadcrumb == Model.Breadcrumbs.Last())
  {
  <li>@breadcrumb.Name</li>
  }
  else
  {
  <li><a href="@breadcrumb.Url">@breadcrumb.Name</a> <span class="divider">/</span></li>
  }
}
</ul>
<table class="table table-striped table-condensed"style="width: 100%;text-align: left">
  <tr>
    <th>Name</th>
    <th>Path</th>
    <th>Source</th>
    <th>Type</th>
  </tr>
@foreach (var entry in Model.Entries)
{
  <tr>
    <td><a href="@entry.Url">@entry.Name</a></td>
    <td>@entry.VirtualPath</td> 
    <td>@entry.Source</td>
    <td>@entry.Type</td>
  </tr>
} 
</table>